package mybatisTest.test.some;

public class WhiteCat extends Cat {
//    static {
//        System.out.println("static segment");
//    }
//    {
//        System.out.println("{}segment");
//    }
//    public WhiteCat(){
//        System.out.println("construct method");
//    }
    public String color;
    public WhiteCat(String name,int age,String color){
        super(name,age);
        this.color=color;
    }
    public void say(String info){
        System.out.println("i am a white cat"+info);
    }
    @Override
    public String toString() {
        return "WhiteCat{" +
                "color='" + color + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getColor() {
        return color;
    }

    public String getColor2(){
        return color+"2";
    }

    public void setColor(String color) {
        this.color = color;
    }
    public void setColor2(String color) {
        this.color = color+"2";
    }

    public boolean isWhite(){
        return this.color.equals("white");
    }
}
